const VueAxios = {
  installed: false,
  install(Vue, instance) {
    if (this.installed || !instance) return;
    this.installed = true;

    Vue.axios = instance;

    Object.defineProperties(Vue.prototype, {
      axios: {
        get: () => instance,
      },
      $http: {
        get: () => instance,
      },
    });
  },
};

export { VueAxios };
